home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / text / hyper / ADtoHT2_0.lha / File.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-19  |  1.1 KB  |  55 lines

  1. #ifndef FILE_H
  2. #define FILE_H
  3.  
  4. #ifndef EXEC_TYPES_H
  5. #include <exec/types.h>
  6. #endif
  7.  
  8. /************************************************************************/
  9.  
  10. struct Word            /* Note: EOF returns an empty word */
  11.   {
  12.     struct MinNode Node;
  13.  
  14.     unsigned long Line;        /* file position of word */
  15.  
  16.     int Whitespace;        /* how much whitespace between this word and the prev word? */
  17.     int Newline;        /* how many newlines *before* the whitespace? */
  18.  
  19.     int Special;        /* is this a special word? */
  20.  
  21.     size_t Length;        /* strlen(Word) */
  22.     char Word[1];
  23.   };
  24.  
  25. extern char *ReadFilename;
  26. extern char *WriteFilename;
  27.  
  28. /************************************************************************/
  29.  
  30. void ROpen (int, char *);
  31. void RClose (void);
  32.  
  33. struct Word *ReadWord (int);
  34. void UnreadWord (struct Word *);
  35.  
  36. #if 0
  37. void FreeWord (struct Word *);
  38. #else
  39. #define FreeWord(Word) free(Word)
  40. #endif
  41.  
  42. char *ReadUntil (char *);
  43. long ReadSkip (void);
  44.  
  45. void WOpen (int, char *);
  46. void WriteHeader (char *, char *);
  47. void WClose (void);
  48. void WriteWhitespace (struct Word *);
  49. void WriteWord (struct Word *);
  50. void WHeadline (char *);
  51.  
  52. void WPrintf (char *,...);
  53.  
  54. #endif  /* FILE_H */
  55.